import numpy as np
from  tensorflow import keras
# build and compile the model
model = keras.Sequential([keras.layers.Dense(units=1,input_shape=[1])])
model.compile(optimizer="sgd",loss='mean_squared_error')

# define and to prepare dataSet

xs = np.array([-1.0,0.0,1.0,2.0,3.0,4.0],dtype=float)
ys =np.array([-3.0,-1.0,1.0,3.0,5.0,7.0])

# train the model
model.fit(xs,ys,epochs=500)

# use model to predict something input
print(model.predict([10.0,20.0]))
